package sysAuth

import initConfig.SysInitData
import sysUtil.SysCommUtil

class SysFunctions {

    //菜单权限控制
    String funcNo;
    String funcName;
    String path;
    String marks;
    Long parentId;
    Long orderNum; //设置菜单级别，目前就设置4级吧，多了就没啥意思了。
    Long rptId = -1; //预留配置报表ID
    String icon ; //图标
    String script;//脚本
    String state = "1" //是否在用
    String operations ="detail"
    String mobile = "0"

    String creator ;//操作人
    String updater;//最近一次更新人
    Date dateCreated;
    Date lastUpdated;

    static constraints = {
        funcNo(nullable: false,blank: false,unique: true )
        funcName(nullable: false )
        path(nullable: true)
        marks(nullable: true)
        parentId(nullable: true)
        orderNum(nullable: true) //设置菜单级别，目前就设置4级吧，多了就没啥意思了。
        rptId(nullable: true) //预留配置报表ID
        icon(nullable: true)
        script(nullable: true)
        creator(nullable: false)
        updater(nullable: true)
        state(nullable: false )
    }
    static mapping = {
        version false
    }

    public Map getMap(){
        ["id":this.id,"funcNo":this.funcNo,funcName:this.funcName,
         orderNum:this.orderNum,path:this.path,parentId: this.parentId,
         icon:this.icon,rptId:this.rptId,marks:this.marks,creator: this.creator,
         script:this.script ]
    }


}
